System system;
Particle_group particle_group;
Star_field star_field;

PImage foreground;
Space_ship space_ship;

void setup() {
  size(800,200);

  background(0);

  particle_group = new Particle_group(80);
  system = new System(particle_group);

  star_field = new Star_field(200);

  foreground = loadImage("data/sunPhysics_4_blackBackground.png");

  space_ship = new Space_ship();

  smooth();
  noStroke();

  rectMode(CENTER);
  shapeMode(CENTER);
  imageMode(CENTER);

  frameRate(30);
}

void draw() {



  fill(0,0,0,100);
  rect(0+width/2,0+height/2,width,height);

  system.math();
  particle_group.math();
  star_field.math();
  space_ship.math();

  particle_group.render();
  star_field.render();

  image(foreground,width/2,height/2);
  space_ship.render();
}


